package com.zqx.visitor.concreteelement;

import com.zqx.visitor.abstractelement.Employee;
import com.zqx.visitor.abstractvisitor.Department;
import lombok.Getter;
import lombok.Setter;

/**
 * description: 具体元素类
 * @author zqx
 * @date 2018/09/04
 */
@Setter
@Getter
public class FulltimeEmployee implements Employee {

    private String name;//姓名
    private double weeklyWage;//周薪
    private int workTime;//工作时间

    public FulltimeEmployee(String name, double weeklyWage, int workTime) {
        this.name = name;
        this.weeklyWage = weeklyWage;
        this.workTime = workTime;
    }

    @Override
    public void accept(Department handler) {
        handler.visit(this);//调用访问者的访问方法
    }
}
